

$class('GoodsItem', [Widget, ActionMixin], {

	_login: false,

	_templateFile: "thtml/GoodsItem.html",

	constructor: function()
	{
		console.debug("GoodsItem ctor");
	},

	create: function(parent, fileName)
	{
		// G11n is another Question...
		this._templateVars = {'price': '促销价'};
		this._templateFile = fileName || this._templateFile;
		this.super(Widget.prototype.create, arguments);
		this._domNode.appendTo(parent);

		this.invokeAction('GoodsAction.data', {}, this.setPrice);

		return this._domNode;
	},

	toString: function()
	{
		var s = this.super(Widget.prototype.toString);
		return s + ":GoodsItem";
	},

	setImage: function(src, type)
	{

	},

	setName: function(name)
	{

	},

	setPrice: function(price)
	{
		this._domNode.find('div.p-price strong').text(price);
	},


});
